; DEBUG = 10F90-113D0, 113F0-11800
;
; 10F90-10FB0 = CD1 LBA / CD2 LBA / CD3 LBA / CD4 LBA / CD #
; 10FB0-11030 = address -> time LBA remap
; 11030-11xxx = address -> time DVD5 remap



;8005edec : 01034023  SUBU    0000002f (t0), 0000002f (t0), 00000028 (v1),
;8005edf0 : 00A82821  ADDU    00000040 (a1), 00000040 (a1), 00000007 (t0),
;-->
;8005edf4 : 03E00008  JR      8001f8e8 (ra),
;8005edf8 : A0450000  SB      00000047 (a1), 0000 (801ffde8 (v0)) [801ffde8]
;-->


org $80011030


; check for >$f9 (159) BCD minutes
srl t0,a1,8
beq t0,r0,BCD_TIME_DONE
nop


; flag 160+ minute CD
lbu t0,2(v0)
nop
ori t0,t0,$80
sb t0,2(v0)

; =======================
; =======================
; =======================
; =======================

; OLD code

BCD_TIME_DONE:
jr ra
sb a1,0(v0)
